gtkprintunixdialog: Remove a redundant (GFile != NULL) check
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 26 Nov 2013 15:06:48 +0000 (15:06 +0000)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Mon, 2 Dec 2013 10:36:26 +0000 (10:36 +0000)
g_file_new_for_uri() is guaranteed to return a non-NULL value, so this
check was redundant, and was confusing the static analyser into
returning a false positive, where it thought the file could be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=712760

gtk/gtkprintunixdialog.c

index ea66c6703dd18bfe0ab9cacdc2dc63ab64e26b9d..763775c54726eabc465174f5ac86ae7ce06686be 100644 (file)
@@ -659,8 +659,7 @@ error_dialogs (GtkPrintUnixDialog *print_dialog,
                 {
                   file = g_file_new_for_uri (option->value);
 
-                  if (file != NULL &&
-                      g_file_query_exists (file, NULL))
+                  if (g_file_query_exists (file, NULL))
                     {
                       toplevel = get_toplevel (GTK_WIDGET (print_dialog));